From: Boyuan Yang Date: Wed, 14 Jan 2026 00:17:36 +0000 (-0500) Subject: opencc (1.1.9+ds1-4) unstable; urgency=medium X-Git-Tag: archive/raspbian/1.1.9+ds1-4+rpi1^2~10 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=4c06e53da961bceacda2252ca6e6cb2370104291;p=opencc.git opencc (1.1.9+ds1-4) unstable; urgency=medium * debian/control: Bump Standards-Version to 4.7.3. * Build-dep on python3-all-dev instead of python3-dev. (Closes: #1125410) * debian/rules: Enable DH_VERBOSE for better debugging. * debian/pybuild.testfiles: Added to enable python binding post-build tests. * debian/patches/backport/345c9a50ab07018f1b4439776bad78a0d40778ec.patch: Add patch from upstream to fix out-of-bounds read issues when handling truncated UTF-8 input. * debian/patches/0009-setup.py-Handle-python-binding-instead-of-cmake.patch: Add patch so that the python3 binding as well as pybind11 usage is handled by setup.py, not CMakeLists.txt. This is required to build for all supported python3 versions instead of just the default one. * debian/rules: Adjust python-related building accordingly. [dgit import unpatched opencc 1.1.9+ds1-4] --- 4c06e53da961bceacda2252ca6e6cb2370104291 diff --cc debian/TODO index 0000000,0000000..6b06ca6 new file mode 100644 --- /dev/null +++ b/debian/TODO @@@ -1,0 -1,0 +1,4 @@@ ++* We need to pack nodejs module provided by opencc when possible. ++* The python binding is not packaged. There is a embedded pybind11 ++ library that need to be dealt if we want to enable python ++ binding support. diff --cc debian/changelog index 0000000,0000000..91922f0 new file mode 100644 --- /dev/null +++ b/debian/changelog @@@ -1,0 -1,0 +1,659 @@@ ++opencc (1.1.9+ds1-4) unstable; urgency=medium ++ ++ * debian/control: Bump Standards-Version to 4.7.3. ++ * Build-dep on python3-all-dev instead of python3-dev. (Closes: #1125410) ++ * debian/rules: Enable DH_VERBOSE for better debugging. ++ * debian/pybuild.testfiles: Added to enable python binding post-build tests. ++ * debian/patches/backport/345c9a50ab07018f1b4439776bad78a0d40778ec.patch: ++ Add patch from upstream to fix out-of-bounds read issues when handling ++ truncated UTF-8 input. ++ * debian/patches/0009-setup.py-Handle-python-binding-instead-of-cmake.patch: ++ Add patch so that the python3 binding as well as pybind11 usage is handled ++ by setup.py, not CMakeLists.txt. This is required to build for all ++ supported python3 versions instead of just the default one. ++ * debian/rules: Adjust python-related building accordingly. ++ ++ -- Boyuan Yang Tue, 13 Jan 2026 19:17:36 -0500 ++ ++opencc (1.1.9+ds1-3) unstable; urgency=medium ++ ++ * debian/control: Bump Standards-Version to 4.7.2. ++ * Upload to unstable. ++ ++ -- Boyuan Yang Sun, 28 Sep 2025 19:36:20 -0400 ++ ++opencc (1.1.9+ds1-3~exp1) experimental; urgency=medium ++ ++ * Test rebuild against libmarisa 0.3.1. ++ ++ -- Boyuan Yang Tue, 23 Sep 2025 20:07:44 -0400 ++ ++opencc (1.1.9+ds1-2) unstable; urgency=medium ++ ++ * debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch, ++ debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch: ++ Backport upstream patches to fix FTBFS with GCC 15. (Closes: #1097512) ++ * debian/patches/0002-Force-build-with-c-17.patch: Force building with ++ c++17 standard to fix FTBFS with the new googletest. ++ ++ -- Boyuan Yang Tue, 09 Sep 2025 08:26:01 -0400 ++ ++opencc (1.1.9+ds1-1) unstable; urgency=medium ++ ++ * Upload to unstable. ++ ++ -- Boyuan Yang Wed, 14 Aug 2024 14:05:52 -0400 ++ ++opencc (1.1.9+ds1-1~exp1) experimental; urgency=medium ++ ++ * New upstream release. ++ * debian/control: Add new build-test-dependency python3-pytest. ++ * debian/patches/0002: Dropped, merged upstream. ++ * debian/libopencc1.1.symbols: Update symbols. ++ * debian/rules: Allow python binding post-build test failure for now ++ before we find out the correct way to test the python package with ++ pytest. ++ ++ -- Boyuan Yang Wed, 14 Aug 2024 12:32:59 -0400 ++ ++opencc (1.1.8+ds1-3) unstable; urgency=medium ++ ++ * Upload to unstable. Closes: #1077816 ++ * debian/control: Move main description to source package section. ++ * debian/control: Add new build-dependency pybuild-plugin-pyproject. ++ * debian/control: Use dh-sequence-python3. ++ * debian/rules: Use pyproject instead of distutils for pybuild. ++ ++ -- Boyuan Yang Sat, 03 Aug 2024 19:07:26 -0400 ++ ++opencc (1.1.8+ds1-2) experimental; urgency=medium ++ ++ * Team upload ++ ++ [ Shengjing Zhu ] ++ * Disable build in setup.py ++ ++ [ Felix Yan ] ++ * Enable python binding (Closes: #1077816) ++ ++ -- Shengjing Zhu Sat, 03 Aug 2024 13:38:47 +0800 ++ ++opencc (1.1.8+ds1-1) unstable; urgency=medium ++ ++ * Upload to unstable. ++ * debian/libopencc1.1.symbols: Reconfirm symbols. ++ ++ -- Boyuan Yang Mon, 29 Jul 2024 12:07:48 -0400 ++ ++opencc (1.1.8+ds1-1~exp1) experimental; urgency=medium ++ ++ * New upstream release. ++ * debian/copyright: Update information. ++ * debian/patches: Refresh patches. ++ * debian/control: Use dh-sequence-pkgkde-symbolshelper. ++ ++ -- Boyuan Yang Sun, 28 Jul 2024 20:00:37 -0400 ++ ++opencc (1.1.7+ds1-1) unstable; urgency=medium ++ ++ * Team upload ++ * New upstream version 1.1.7+ds1 ++ * debian/libopencc-dev.install: ++ - Install CMake config modules ++ ++ -- Gunnar Hjalmarsson Sat, 21 Oct 2023 21:22:49 +0200 ++ ++opencc (1.1.6+ds1-2) unstable; urgency=medium ++ ++ [ Helmut Grohne ] ++ * Fix FTCBFS: Add B-D: opencc for opencc_dict. (Closes: #1051036) ++ ++ -- Boyuan Yang Fri, 01 Sep 2023 12:00:26 -0400 ++ ++opencc (1.1.6+ds1-1) unstable; urgency=medium ++ ++ * Team upload ++ * New upstream version 1.1.6+ds1 ++ * Refresh patches: ++ - d/p/0001-use-cmake-install-libdir.patch ++ - d/p/0005-Use-system-googletest.patch ++ ++ -- Gunnar Hjalmarsson Sat, 10 Dec 2022 13:10:03 +0100 ++ ++opencc (1.1.5+ds1-1) unstable; urgency=medium ++ ++ * Team upload ++ * New upstream version 1.1.5+ds1 ++ ++ -- Gunnar Hjalmarsson Tue, 06 Dec 2022 13:40:36 +0100 ++ ++opencc (1.1.4+ds1-4) unstable; urgency=medium ++ ++ * Team upload ++ * Work around uscan issue with GitHub releases page ++ ++ -- Gunnar Hjalmarsson Tue, 08 Nov 2022 16:33:54 +0100 ++ ++opencc (1.1.4+ds1-3) unstable; urgency=medium ++ ++ * Team upload ++ * debian/libopencc1.1.symbols: ++ - Update other archs for LTO using buildd logs (closes: #1015565) ++ * Build with GCC-12 ++ - It builds fine now with GCC-12, so the symbols fix for LTO also ++ closes: #1013008. ++ ++ -- Gunnar Hjalmarsson Mon, 25 Jul 2022 02:26:42 +0200 ++ ++opencc (1.1.4+ds1-2) unstable; urgency=medium ++ ++ * Team upload ++ * Start fixing FTBFS with LTO enabled (see bug 1015565): ++ - debian/rules: Enable LTO ++ - Create symbols file for amd64 only ++ * Bump Standards-Version to 4.6.1 ++ * debian/copyright: Bump copyright year to 2022 ++ ++ -- Gunnar Hjalmarsson Sat, 23 Jul 2022 19:05:33 +0200 ++ ++opencc (1.1.4+ds1-1) unstable; urgency=medium ++ ++ [ xiao sheng wen ] ++ * update-debian-copyright to 2021 year. ++ ++ [ Boyuan Yang ] ++ * New upstream version 1.1.4+ds1. ++ * debian/patches: Refresh patches. ++ * debian/libopencc1.1.symbols: Refresh symbols. ++ ++ -- Boyuan Yang Sat, 04 Jun 2022 11:52:24 -0400 ++ ++opencc (1.1.3+ds1-5) unstable; urgency=medium ++ ++ * Team upload ++ * debian/libopencc1.1.symbols: ++ - Refresh using buildd logs for all archs and pkgkde-symbolshelper ++ (Closes: #997412) ++ ++ -- Gunnar Hjalmarsson Wed, 27 Oct 2021 09:39:59 +0200 ++ ++opencc (1.1.3+ds1-4) unstable; urgency=medium ++ ++ * Team upload ++ * Re-build with GCC 11 ++ * debian/libopencc1.1.symbols: ++ - amd64 tweak using buildd log from test rebuild ++ ++ -- Gunnar Hjalmarsson Tue, 26 Oct 2021 23:03:58 +0200 ++ ++opencc (1.1.3+ds1-3) unstable; urgency=medium ++ ++ * Refresh symbols again for all archs using buildd logs. ++ ++ -- Boyuan Yang Mon, 20 Sep 2021 15:44:37 -0400 ++ ++opencc (1.1.3+ds1-2) unstable; urgency=medium ++ ++ * Refresh symbols for all archs using buildd logs. ++ ++ -- Boyuan Yang Sun, 19 Sep 2021 16:32:52 -0400 ++ ++opencc (1.1.3+ds1-1) unstable; urgency=medium ++ ++ * New upstream release 1.1.3. ++ * Add myself into uploaders list. ++ * debian/patches: Refresh patches. ++ + 0002-use-system-libraries.patch: Dropped, upstream now provides ++ CMake options to use system libraries. ++ + Drop backported patches (0006, 0007), merged upstream. ++ * debian/control: ++ + Bump Standards-Version to 4.6.0. ++ + Add new build-dependency pybind11-dev. ++ * debian/rules: Refresh cmake build options. ++ * debian/libopencc1.1.symbols: Refresh symbols. ++ ++ -- Boyuan Yang Sat, 18 Sep 2021 21:13:03 -0400 ++ ++opencc (1.1.1+git20200624+ds2-10) unstable; urgency=medium ++ ++ * Team upload. ++ * Upload to unstable. ++ * Backport patch to fix performance regression again. ++ Add ++ + 0006-Fix-a-bug-in-the-calculation-of-DictGroup-keyMaxLeng.patch ++ + 0007-Fix-a-severe-performance-bug-in-Conversion-Convert-t.patch ++ ++ -- Shengjing Zhu Sun, 07 Mar 2021 14:20:40 +0800 ++ ++opencc (1.1.1+git20200624+ds2-9) experimental; urgency=medium ++ ++ * Team upload. ++ * Remove unused command from autopkgtest scripts ++ * Add build-essential to autopkgtest ++ ++ -- Shengjing Zhu Sun, 07 Mar 2021 00:54:22 +0800 ++ ++opencc (1.1.1+git20200624+ds2-8) experimental; urgency=medium ++ ++ * Team upload. ++ * Enable test when building ++ * Add autopkgtest ++ ++ -- Shengjing Zhu Sat, 06 Mar 2021 17:57:00 +0800 ++ ++opencc (1.1.1+git20200624+ds2-7) unstable; urgency=high ++ ++ * Team upload. ++ * Drop debian/patches/0005 for now due to regression reported. ++ See also https://github.com/fcitx/fcitx5/issues/238 . ++ ++ -- Boyuan Yang Fri, 05 Mar 2021 09:37:48 -0500 ++ ++opencc (1.1.1+git20200624+ds2-6) unstable; urgency=high ++ ++ * Team upload. ++ * debian/patches/0005: Add upstream patch to fix severe performance ++ regression in `Conversion::Convert` that caused O(N^2) complexity. ++ * debian/rules: Disable parallel build to workaround some random ++ build error for now. ++ ++ -- Boyuan Yang Sun, 28 Feb 2021 19:48:01 -0500 ++ ++opencc (1.1.1+git20200624+ds2-5) unstable; urgency=medium ++ ++ * Team upload. ++ * debian/rules: Rewrite to support build profile. ++ * debian/rules: Enable dh_doxygen when building docs. ++ * Drop unnecessary build dependencies. (Closes: #981606) ++ * debian/control: Mark build-dependency doxygen as . ++ * debian/control: Drop build-dependency on libjs-jquery. Let ++ doxygen handle it. ++ * debian/control: Drop build-dependency on graphviz. Doxyfile ++ did not enable HAVE_DOT. ++ * debian/control: Drop build-dependency on dartz. Currently opencc ++ uses its vendored copy. ++ ++ -- Boyuan Yang Tue, 02 Feb 2021 11:58:39 -0500 ++ ++opencc (1.1.1+git20200624+ds2-4) unstable; urgency=medium ++ ++ * Build-depends on pkg-kde-tools to handle symbols. ++ * debian/libopencc1.1.symbols: Refresh symbols using Debian ++ buildd logs. ++ ++ -- Boyuan Yang Sun, 17 Jan 2021 17:52:00 -0500 ++ ++opencc (1.1.1+git20200624+ds2-3) unstable; urgency=medium ++ ++ * Team upload. ++ ++ [ Gunnar Hjalmarsson ] ++ * Replace shlibs file with symbols file ++ * debian/patches/no-remote-images-when-reading-docs-on-disk.patch: ++ - Fixes a privacy breach previously reported as Lintian warnings ++ * Bump Standards-Version to 4.5.1 ++ * debian/source/lintian-overrides: ++ - Explain why libopencc1.1 is not multi-archified even if ++ libopencc-dev depends on it. ++ ++ [ Boyuan Yang ] ++ * Mark package libopencc-dev as Multi-Arch: same ++ ++ -- Boyuan Yang Sat, 16 Jan 2021 10:36:38 -0500 ++ ++opencc (1.1.1+git20200624+ds2-2) unstable; urgency=high ++ ++ * Team upload. ++ * debian/control: Mark package libopencc-data Breaks+Replaces the ++ old libopencc2-data package. (Closes: #963187) ++ ++ -- Boyuan Yang Sat, 04 Jul 2020 13:46:28 -0400 ++ ++opencc (1.1.1+git20200624+ds2-1) unstable; urgency=medium ++ ++ * Team upload. ++ * Upload to unstable. ++ ++ -- Boyuan Yang Sat, 04 Jul 2020 06:28:22 -0400 ++ ++opencc (1.1.1+git20200624+ds2-1~exp2) experimental; urgency=medium ++ ++ * Team upload. ++ * Rebuild against marisa 0.2.6. ++ ++ -- Boyuan Yang Fri, 03 Jul 2020 17:40:16 -0400 ++ ++opencc (1.1.1+git20200624+ds2-1~exp1) experimental; urgency=medium ++ ++ * Team upload. ++ ++ [ 肖盛文 ] ++ * add libopencc-doc.doc-base,to register opencc to doc-base ++ * d/control: ++ - add Section: doc for libopencc-doc ++ - add Depends: libjs-jquery for the libopencc-doc package ++ ++ [ Boyuan Yang ] ++ * Import new upstream snapshot 2020-06-24 to fix some bugs. ++ * debian/patches: Refresh patches. ++ ++ -- Boyuan Yang Thu, 25 Jun 2020 20:34:50 -0400 ++ ++opencc (1.1.1+ds1-1~exp1) experimental; urgency=medium ++ ++ * Team upload. ++ ++ [ 肖盛文 ] ++ * New upstream version 1.1.1 ++ * change libopencc data pkgname from libopencc[num]-data to libopencc-data ++ * change libopencc pkgname from libopencc2 to libopencc1.1 ++ * update debian/libopencc1.1.install for filename *.ocd2 ++ * d/rules: ++ - delete override_dh_missing: ++ - use execute_after_dh_auto_clean: ++ - use execute_after_dh_auto_install: ++ * d/copyright: ++ - update dirname for new upstream version ++ - add xiao sheng wen for debian/* ++ - add Upstream-Contact ++ * d/control: ++ - add Rules-Requires-Root: no ++ - add New Uploaders: xiao sheng wen ++ - delete some Replaces: and Breaks:, ++ let the new version packages can co-exist with the old ones. ++ * add debian/upstream/metadata ++ * d/watch: use @PACKAGE@ @ANY_VERSION@@ARCHIVE_EXT@ ++ ++ [ Boyuan Yang ] ++ * ds: Do not include bundled gtest and libmarisa. ++ * debian/rules: Explicitly disable building bundled libmarisa. ++ * debian/libopencc1.1.shlibs: Reset version requirement. ++ * debian/control: Add new build-dependency libmarisa-dev. ++ * debian/patches: Refreshed. ++ ++ -- Boyuan Yang Sat, 23 May 2020 15:51:01 -0400 ++ ++opencc (1.0.6-2) unstable; urgency=medium ++ ++ * Team upload. ++ * debian/libopencc2.shlibs: Bump version requirement to 1.0.6. ++ * debian/control: Bump debhelper compat to v13. ++ * debian/rules: Drop as-needed linker flag. ++ ++ -- Boyuan Yang Sat, 02 May 2020 10:46:44 -0400 ++ ++opencc (1.0.6-1) unstable; urgency=medium ++ ++ * Team upload. ++ * New upstream release 1.0.6. ++ * debian/control: ++ + Bump Standards-Version to 4.5.0. ++ + Add Debian Chinese Team into uploaders to show team's interest ++ in package co-maintenance. ++ * debian/patches: Refresh patches. ++ ++ -- Boyuan Yang Mon, 13 Apr 2020 18:20:20 -0400 ++ ++opencc (1.0.5+git20190530-1) unstable; urgency=medium ++ ++ * Team upload. ++ * New upstream git snapshot (2019-05-30). ++ - opencc::ConvertDirectory is now exported. ++ - Various fixes and document updates. ++ * debian/control: ++ + Bump Standards-Version to 4.4.0. ++ + Bump debhelper copmat to v12. ++ + Add build-dependency graphviz for dot support for doxygen. ++ * debian/patches: Add patch 0004 to migrate from python2 to ++ python3. (Closes: #937195) ++ ++ -- Boyuan Yang Fri, 30 Aug 2019 14:09:03 -0400 ++ ++opencc (1.0.5-2) unstable; urgency=medium ++ ++ * Team upload. ++ * Rebuild against gcc 8. ++ * debian/control: ++ + Update uploaders email address and use the @debian.org one. ++ + Bump Standards-Version to 4.2.1 (no changes needed). ++ * debian/rules: Avoid explicit invocation to dpkg-architecture. ++ ++ -- Boyuan Yang Thu, 20 Sep 2018 15:07:38 -0400 ++ ++opencc (1.0.5-1) unstable; urgency=medium ++ ++ * Team upload. ++ * New upstream Release. ++ * Remove libopencc2 M-A:same mark for now since ocd files exist. ++ (Closes: #874227) ++ * Remove LI Daobing from Uploaders list. (Closes: #841792) ++ Thank you for your previous work! ++ * Apply "wrap-and-sort -abst". ++ * d/patches: Refresh patches. ++ * d/changelog: Remove trailing spaces. ++ * d/control: Use debian-input-method maillist in Maintainer field. ++ Closes: #899625. ++ * d/control: Use Vcs URL on Salsa platform. ++ * d/control: Bump Standards-Version to 4.1.4. ++ * d/control: Bump debhelper compat to v11. ++ * d/rules: Use NEWS.md as upstream changelog. ++ * d/rules: Use "dh_missing --fail-missing". ++ * d/shlibs: Explicitly require the latest library version. ++ ++ -- Boyuan Yang <073plan@gmail.com> Thu, 21 Jun 2018 11:18:37 +0800 ++ ++opencc (1.0.4-5) unstable; urgency=medium ++ ++ * Make ocd data files arch:any (Closes: #851733) ++ ++ -- Aron Xu Fri, 20 Jan 2017 15:15:35 +0800 ++ ++opencc (1.0.4-4) unstable; urgency=medium ++ ++ * Tighter Breaks/Conflicts version (Closes: #847145) ++ ++ -- Aron Xu Mon, 19 Dec 2016 23:30:01 +0800 ++ ++opencc (1.0.4-3) unstable; urgency=medium ++ ++ * Correct Breaks/Conflicts version (Closes: #846665) ++ ++ -- Aron Xu Sun, 04 Dec 2016 16:39:48 +0800 ++ ++opencc (1.0.4-2) unstable; urgency=medium ++ ++ [ Aron Xu ] ++ * Install data files to libopencc2-data, drop -dbg package ++ (Closes: #836395) ++ ++ [ Boyuan Yang ] ++ * Add BSD-3-clause license in d/copyright ++ ++ -- Aron Xu Sat, 03 Sep 2016 21:07:26 +0800 ++ ++opencc (1.0.4-1) unstable; urgency=medium ++ ++ * Imported Upstream version 1.0.4 ++ * Update d/watch to Github URL ++ * std-ver: 3.9.6 -> 3.9.8, no change ++ * Update VCS-Browser URL to use HTTPS ++ ++ -- Aron Xu Mon, 08 Aug 2016 14:43:15 +0800 ++ ++opencc (1.0.3-1) experimental; urgency=medium ++ ++ * New upstream release ++ * Add myself to Uploaders ++ * Drop symbols file, see README.Debian ++ ++ -- Aron Xu Wed, 16 Dec 2015 00:34:21 +0800 ++ ++opencc (1.0.2-1) experimental; urgency=medium ++ ++ * Team upload for new upstream release. ++ * SONAME transition: libopencc1 -> libopencc2 ++ * Add libjs-jquery, libtclap-dev, darts, rapidjson-dev to B-D. ++ * Patches added/updated: ++ - lib-name-match-soversion.patch: rename library to match SONAME ++ - install-data-file-to-meet-need-of-multi-arch.patch: updated ++ - use-system-libraries.patch: do not use embeded libraries ++ * Use system version of jquery.js instead of embeded one. ++ * Removed python-opencc, upstream abandoned. ++ * Updated symbols file. ++ * Rewrite copyright file to machine-readable format. ++ * Allow parallel building. ++ ++ -- Aron Xu Thu, 20 Nov 2014 17:09:31 +0800 ++ ++opencc (0.4.3-2) unstable; urgency=low ++ ++ * Add the python-opencc package to support the Python binding. ++ Closes: #694993 ++ * Bump standard version to 3.9.5. ++ ++ -- Osamu Aoki Sat, 02 Nov 2013 12:17:51 +0900 ++ ++opencc (0.4.3-1) experimental; urgency=low ++ ++ * New upstream release. ++ * Update watch file. ++ * Clean up debian/control and wrap-and-sort. ++ * Update symbols file. ++ ++ -- Osamu Aoki Sun, 15 Sep 2013 00:13:31 +0900 ++ ++opencc (0.4.0-1) experimental; urgency=low ++ ++ * New upstream release ++ * fix-new-test-cases.patch in upstream ++ * part of more_clear_man_c_option.patch is in upstream ++ the rest is in install-data-file-to-meet-need-of-multi-arch.path ++ ++ -- Asias He Fri, 05 Apr 2013 10:52:29 +0800 ++ ++opencc (0.3.0-3) unstable; urgency=low ++ ++ * Rebuild to ++ generate little endian mo file on any arch (Closes: #670016). ++ * add an - before include buildflags.mk ++ ++ -- YunQiang Su Sun, 10 Jun 2012 19:35:51 +0800 ++ ++opencc (0.3.0-2) unstable; urgency=low ++ ++ * Multi-arch it. ++ * Add libopencc-dbg package. ++ * Bump standard version to 3.9.3. ++ * Add YunQiang Su to Uploaders. ++ * Enable CPPFLAGS hardening flags (Closes: #665322). ++ * Better explanation for the -c option arguments of opencc, ++ give the path of these files out. (Closes: #656201). ++ ++ -- YunQiang Su Thu, 29 Mar 2012 03:22:51 +0800 ++ ++opencc (0.3.0-1) unstable; urgency=low ++ ++ * Team upload. ++ ++ [ Kan-Ru Chen ] ++ * New upstream release ++ * debian/control: ++ - Remove autotools-dev and quilt from Build-Depends ++ * debian/rules: ++ - Support `nostrip' DEB_BUILD_OPTIONS ++ - Enable hardening flags. ++ * debian/docs: Install NEWS ++ * debian/copyright: Update update url ++ * debian/watch: Update upstream url ++ * debian/patches/fix-big-endian-build.diff: merged upstream ++ * debian/patches/fix-new-test-cases.patch: New patch. ++ ++ -- Kan-Ru Chen Sat, 17 Dec 2011 16:41:49 +0800 ++ ++opencc (0.2.0-2) unstable; urgency=low ++ ++ * Fix "Please fix FTBFS on mips, ppc, s390 and sparc" (Closes: #624562) ++ * debian/control: bump standards version to 3.9.2. ++ * Set DM-Upload-Allowed to yes ++ ++ -- Asias He Mon, 16 May 2011 20:46:03 +0800 ++ ++opencc (0.2.0-1) unstable; urgency=low ++ ++ * New upstream release ++ * Move usr/share/locale to package opencc ++ * Add cmake to Build-Depends ++ * Change Homepage to http://code.google.com/p/opencc ++ * Set Vcs to git.debian.org ++ ++ -- Asias He Thu, 17 Mar 2011 21:36:41 +0800 ++ ++opencc (0.1.2-1) unstable; urgency=low ++ ++ * New upstream release. ++ * debian/libopencc1.symbols: updated. ++ ++ -- LI Daobing Wed, 22 Sep 2010 20:40:54 +0800 ++ ++opencc (0.1.1-2) unstable; urgency=low ++ ++ *debian/control: add Conflicts to libopencc0 (Closes: #596434) ++ ++ -- Asias He Sun, 12 Sep 2010 14:58:18 +0800 ++ ++opencc (0.1.1-1) unstable; urgency=low ++ ++ [ Asias He ] ++ * New upstream release (closes: #591076). ++ * debian/control: bump standards version to 3.9.1. ++ * debian/watch: use googlecode.debian.net. ++ ++ [ LI Daobing ] ++ * debian/clean: added. ++ ++ -- LI Daobing Wed, 11 Aug 2010 22:04:12 +0800 ++ ++opencc (0.1.0-1) unstable; urgency=low ++ ++ * New upstream release. ++ * debian/control: ++ - bump standards version to 3.9.1. ++ - libopencc0 -> libopecc1 (closes: #590473). ++ - libopencc1 replaces libopencc0. ++ * libopencc0 -> libopencc1: ++ - debian/libopencc0.install => debian/libopencc1.install ++ - debian/libopencc0.symbols => debian/libopencc1.symbols ++ ++ -- LI Daobing Thu, 29 Jul 2010 23:05:17 +0800 ++ ++opencc (0.0.5-1) unstable; urgency=low ++ ++ * New upstream release. ++ * debian/control: no longer build depends on python. ++ * debian/opencc.install: move .mo files to libopencc0. ++ * debian/libopencc0.install: install .mo files. ++ * debian/opencc_dict.1: deleted. ++ * debian/opencc.manpages: deleted. ++ ++ -- LI Daobing Wed, 21 Jul 2010 22:42:32 +0800 ++ ++opencc (0.0.4-1) unstable; urgency=low ++ ++ * New upstream release. ++ * debian/control: bump standards version to 3.9.0. ++ ++ -- LI Daobing Fri, 16 Jul 2010 23:52:08 +0800 ++ ++opencc (0.0.3-1) unstable; urgency=low ++ ++ * New upstream release. ++ * debian/opencc.install: updated. ++ * debian/control: opencc depends on libopencc0 at the same version. ++ ++ -- LI Daobing Tue, 22 Jun 2010 19:08:33 +0800 ++ ++opencc (0.0.2-1) unstable; urgency=low ++ ++ * Initial release (Closes: #585621) ++ ++ -- LI Daobing Sat, 19 Jun 2010 18:27:20 +0800 diff --cc debian/clean index 0000000,0000000..0777230 new file mode 100644 --- /dev/null +++ b/debian/clean @@@ -1,0 -1,0 +1,17 @@@ ++test/mix2zhs.ans ++test/mix2zhs.in ++test/mix2zhs.ini ++test/mix2zht.ans ++test/mix2zht.in ++test/mix2zht.ini ++test/opencc ++test/simp_to_trad_characters.ocd ++test/simp_to_trad_phrases.ocd ++test/trad_to_simp_characters.ocd ++test/trad_to_simp_phrases.ocd ++test/zhs2zht.ans ++test/zhs2zht.in ++test/zhs2zht.ini ++test/zht2zhs.ans ++test/zht2zhs.in ++test/zht2zhs.ini diff --cc debian/control index 0000000,0000000..745289f new file mode 100644 --- /dev/null +++ b/debian/control @@@ -1,0 -1,0 +1,117 @@@ ++Source: opencc ++Section: libs ++Maintainer: Debian Input Method Team ++Uploaders: ++ Debian Chinese Team , ++ Asias He , ++ YunQiang Su , ++ Osamu Aoki , ++ Aron Xu , ++ xiao sheng wen , ++ Boyuan Yang , ++Build-Depends: ++ chrpath, ++ cmake, ++ darts, ++ debhelper-compat (= 13), ++ dh-sequence-python3, ++ doxygen , ++ googletest , ++ libmarisa-dev (>> 0.3), ++ libtclap-dev, ++ opencc , ++ dh-sequence-pkgkde-symbolshelper, ++ pybind11-dev, ++ python3-all-dev, ++ rapidjson-dev, ++ pybuild-plugin-pyproject, ++ python3-pybind11, ++ python3-pytest , ++ python3-setuptools, ++ python3-wheel, ++Standards-Version: 4.7.3 ++Homepage: https://github.com/BYVoid/OpenCC ++Vcs-Git: https://salsa.debian.org/debian/opencc.git ++Vcs-Browser: https://salsa.debian.org/debian/opencc ++Description: simplified-traditional Chinese conversion library ++ opencc is a library for converting character between traditional Chinese and ++ simplified Chinese. ++ ++Package: libopencc-data ++Architecture: all ++Multi-Arch: foreign ++Depends: ++ ${misc:Depends}, ++Breaks: ++ libopencc2-data (<< 1.1.1~), ++Replaces: ++ libopencc2-data (<< 1.1.1~), ++Description: ${source:Synopsis} - data files ++ ${source:Extended-Description} ++ . ++ This package includes the data files. ++ ++Package: libopencc-dev ++Section: libdevel ++Architecture: any ++Multi-Arch: same ++Depends: ++ libopencc1.1 (= ${binary:Version}), ++ ${misc:Depends}, ++Suggests: ++ libopencc-doc, ++Description: ${source:Synopsis} - development ++ ${source:Extended-Description} ++ . ++ This package includes the development support files. ++ ++Package: libopencc-doc ++Architecture: all ++Multi-Arch: foreign ++Section: doc ++Depends: ++ ${misc:Depends}, ++Description: ${source:Synopsis} - document ++ ${source:Extended-Description} ++ . ++ This package includes the library document files. ++ ++Package: libopencc1.1 ++Architecture: any ++Pre-Depends: ++ ${misc:Pre-Depends}, ++Depends: ++ libopencc-data (= ${source:Version}), ++ ${misc:Depends}, ++ ${shlibs:Depends}, ++Description: ${source:Synopsis} - runtime ++ ${source:Extended-Description} ++ . ++ This package includes the shared library. ++ ++Package: opencc ++Section: utils ++Architecture: any ++Multi-Arch: foreign ++Depends: ++ libopencc1.1 (= ${binary:Version}), ++ ${misc:Depends}, ++ ${shlibs:Depends}, ++Suggests: ++ libopencc-doc, ++Description: simplified-traditional Chinese conversion tool ++ ${source:Extended-Description} ++ . ++ This package includes the conversion tool. ++ ++Package: python3-opencc ++Section: python ++Architecture: any ++Depends: ++ ${misc:Depends}, ++ ${python3:Depends}, ++ ${shlibs:Depends}, ++Description: ${source:Synopsis} - Python 3.x ++ ${source:Extended-Description} ++ . ++ This package provides the Python 3.x module. diff --cc debian/copyright index 0000000,0000000..3bb2777 new file mode 100644 --- /dev/null +++ b/debian/copyright @@@ -1,0 -1,0 +1,39 @@@ ++Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ++Upstream-Name: OpenCC ++Upstream-Contact: BYVoid ++Source: https://github.com/BYVoid/OpenCC/releases ++Files-Excluded: ++ deps/darts-*/* ++ deps/google-benchmark/* ++ deps/googletest-*/* ++ deps/marisa-*/* ++ deps/rapidjson-*/* ++ deps/tclap-*/* ++ deps/pybind11-*/* ++ ++Files: * ++Copyright: 2010-2022, BYVoid ++License: Apache-2.0 ++ ++Files: debian/* ++Copyright: 2010, LI Daobing ++ 2014, Aron Xu ++ 2020-2021, xiao sheng wen ++ 2022, Boyuan Yang ++License: Apache-2.0 ++ ++License: Apache-2.0 ++ Licensed under the Apache License, Version 2.0 (the "License"); ++ you may not use this file except in compliance with the License. ++ You may obtain a copy of the License at ++ . ++ http://www.apache.org/licenses/LICENSE-2.0 ++ . ++ Unless required by applicable law or agreed to in writing, software ++ distributed under the License is distributed on an "AS IS" BASIS, ++ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ See the License for the specific language governing permissions and ++ limitations under the License. ++ . ++ On Debian systems, the complete text of the Apache version 2.0 license ++ can be found in `/usr/share/common-licenses/Apache-2.0'. diff --cc debian/docs index 0000000,0000000..0b6e0f3 new file mode 100644 --- /dev/null +++ b/debian/docs @@@ -1,0 -1,0 +1,2 @@@ ++AUTHORS ++README.md diff --cc debian/gbp.conf index 0000000,0000000..cec628c new file mode 100644 --- /dev/null +++ b/debian/gbp.conf @@@ -1,0 -1,0 +1,2 @@@ ++[DEFAULT] ++pristine-tar = True diff --cc debian/libopencc-data.install index 0000000,0000000..1ef017d new file mode 100644 --- /dev/null +++ b/debian/libopencc-data.install @@@ -1,0 -1,0 +1,1 @@@ ++usr/share/opencc/*.json diff --cc debian/libopencc-dev.install index 0000000,0000000..e708105 new file mode 100644 --- /dev/null +++ b/debian/libopencc-dev.install @@@ -1,0 -1,0 +1,4 @@@ ++usr/include/* ++usr/lib/*/lib*.so ++usr/lib/*/pkgconfig/* ++usr/lib/*/cmake/opencc/* diff --cc debian/libopencc-doc.doc-base index 0000000,0000000..8c24829 new file mode 100644 --- /dev/null +++ b/debian/libopencc-doc.doc-base @@@ -1,0 -1,0 +1,10 @@@ ++Document: opencc ++Title: Open Chinese Convert ++Author: BYVoid ++Abstract: This document describes the OpenCC. ++ A project for conversion between Traditional and Simplified Chinese. ++Section: Text ++ ++Format: HTML ++Index: /usr/share/doc/opencc/html/index.html ++Files: /usr/share/doc/opencc/html/*.html diff --cc debian/libopencc-doc.docs index 0000000,0000000..69420c8 new file mode 100644 --- /dev/null +++ b/debian/libopencc-doc.docs @@@ -1,0 -1,0 +1,1 @@@ ++usr/share/opencc/doc/* diff --cc debian/libopencc1.1.install index 0000000,0000000..28d741f new file mode 100644 --- /dev/null +++ b/debian/libopencc1.1.install @@@ -1,0 -1,0 +1,2 @@@ ++usr/lib/*/lib*.so.* ++usr/share/opencc/*.ocd2 diff --cc debian/libopencc1.1.symbols index 0000000,0000000..2d64d5a new file mode 100644 --- /dev/null +++ b/debian/libopencc1.1.symbols @@@ -1,0 -1,0 +1,240 @@@ ++# SymbolsHelper-Confirmed: 1.1.8 amd64 arm64 armel armhf hppa i386 loong64 m68k mips64el powerpc ppc64 ppc64el sparc64 ++libopencc.so.1.1 libopencc1.1 #MINVER# ++* Build-Depends-Package: libopencc-dev ++ _Z11ConvertDictRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN6opencc4DictEE@Base 1.1.4+ds1 ++ _Z14LoadDictionaryRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_@Base 1.1.4+ds1 ++ _Z20opencc_open_internalPKc@Base 1.1.4+ds1 ++ _ZN6opencc10BinaryDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDict11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDictC1Ev@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDictC2Ev@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDictD0Ev@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDictD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc10MarisaDictD2Ev@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract11SelectWordsEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract15ExtractPrefixesEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract15ExtractSuffixesEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract18CalculateCohesionsEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract18CalculateFrequencyEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract21ExtractWordCandidatesEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract22CalculatePrefixEntropyEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract22CalculateSuffixEntropyEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract27DefaultPreCalculationFilterERKS0_RKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract28DefaultPostCalculationFilterERKS0_RKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtract5ResetEv@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtractC1Ev@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtractC2Ev@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtractD0Ev@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtractD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc13PhraseExtractD2Ev@Base 1.1.4+ds1 ++ _ZN6opencc15ConversionChainC1ENSt7__cxx114listISt10shared_ptrINS_10ConversionEESaIS5_EEE@Base 1.1.4+ds1 ++ _ZN6opencc15ConversionChainC2ENSt7__cxx114listISt10shared_ptrINS_10ConversionEESaIS5_EEE@Base 1.1.4+ds1 ++ _ZN6opencc15SimpleConverterC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ _ZN6opencc15SimpleConverterC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EE@Base 1.1.8 ++ _ZN6opencc15SimpleConverterC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EEPKc@Base 1.1.8 ++ _ZN6opencc15SimpleConverterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ _ZN6opencc15SimpleConverterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EE@Base 1.1.8 ++ _ZN6opencc15SimpleConverterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EEPKc@Base 1.1.8 ++ _ZN6opencc15SimpleConverterD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc15SimpleConverterD2Ev@Base 1.1.4+ds1 ++ _ZN6opencc16SerializedValues11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc17ConvertDictionaryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_S7_S7_@Base 1.1.4+ds1 ++ _ZN6opencc6Config11NewFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.9 ++ _ZN6opencc6Config11NewFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EEPKc@Base 1.1.8 ++ _ZN6opencc6Config13NewFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EE@Base 1.1.8 ++ _ZN6opencc6Config13NewFromStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_@Base 1.1.4+ds1 ++ _ZN6opencc6ConfigC1Ev@Base 1.1.4+ds1 ++ _ZN6opencc6ConfigC2Ev@Base 1.1.4+ds1 ++ _ZN6opencc6ConfigD0Ev@Base 1.1.4+ds1 ++ _ZN6opencc6ConfigD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc6ConfigD2Ev@Base 1.1.4+ds1 ++ _ZN6opencc7Lexicon20ParseLexiconFromFileEP8_IO_FILE@Base 1.1.8 ++ _ZN6opencc7Lexicon4SortEv@Base 1.1.4+ds1 ++ _ZN6opencc7Lexicon8IsSortedEv@Base 1.1.4+ds1 ++ _ZN6opencc7Lexicon8IsUniqueEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ _ZN6opencc8TextDict11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 ++ _ZN6opencc8TextDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc8TextDict17NewFromSortedFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc8TextDictC1ERKSt10shared_ptrINS_7LexiconEE@Base 1.1.4+ds1 ++ _ZN6opencc8TextDictC2ERKSt10shared_ptrINS_7LexiconEE@Base 1.1.4+ds1 ++ _ZN6opencc8TextDictD0Ev@Base 1.1.4+ds1 ++ _ZN6opencc8TextDictD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc8TextDictD2Ev@Base 1.1.4+ds1 ++ _ZN6opencc8UTF8Util11SkipUtf8BomEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc8internal19ContainsPunctuationERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDict11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDict11NewFromFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDictC1Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDictC2Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDictD0Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDictD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DartsDictD2Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DictEntry12UPtrLessThanERKSt10unique_ptrIS0_St14default_deleteIS0_EES6_@Base 1.1.4+ds1 ++ _ZN6opencc9DictGroup11NewFromDictERKNS_4DictE@Base 1.1.4+ds1 ++ _ZN6opencc9DictGroupC1ERKNSt7__cxx114listISt10shared_ptrINS_4DictEESaIS5_EEE@Base 1.1.4+ds1 ++ _ZN6opencc9DictGroupC2ERKNSt7__cxx114listISt10shared_ptrINS_4DictEESaIS5_EEE@Base 1.1.4+ds1 ++ _ZN6opencc9DictGroupD0Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DictGroupD1Ev@Base 1.1.4+ds1 ++ _ZN6opencc9DictGroupD2Ev@Base 1.1.4+ds1 ++ _ZNK6opencc10BinaryDict12KeyMaxLengthEv@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc10BinaryDict15ConstructBufferERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorI{size_t}SaI{size_t}EER{size_t}S7_SB_SC_@Base 1.1.4+ds1 ++ _ZNK6opencc10BinaryDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZNK6opencc10Conversion7ConvertB5cxx11EPKc@Base 1.1.4+ds1 ++ _ZNK6opencc10Conversion7ConvertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ _ZNK6opencc10Conversion7ConvertERKSt10shared_ptrINS_8SegmentsEE@Base 1.1.4+ds1 ++ _ZNK6opencc10MarisaDict10GetLexiconEv@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc10MarisaDict11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc10MarisaDict12KeyMaxLengthEv@Base 1.1.4+ds1 ++ _ZNK6opencc10MarisaDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc10MarisaDict16MatchAllPrefixesEPKc{size_t}@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc10MarisaDict5MatchEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract11ProbabilityERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract13PrefixEntropyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract13SuffixEntropyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract14LogProbabilityERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc13PhraseExtract16CalculateEntropyERKSt13unordered_mapINS_19UTF8StringSliceBaseIhEE{size_t}NS3_6HasherESt8equal_toIS3_ESaISt4pairIKS3_{size_t}EEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract17CalculateCohesionERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract3PMIERKNS_19UTF8StringSliceBaseIhEES4_S4_@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract6SignalERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract7EntropyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract8CohesionERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc13PhraseExtract9FrequencyERKNS_19UTF8StringSliceBaseIhEE@Base 1.1.4+ds1 ++ _ZNK6opencc15ConversionChain7ConvertERKSt10shared_ptrINS_8SegmentsEE@Base 1.1.4+ds1 ++ _ZNK6opencc15SimpleConverter7ConvertB5cxx11EPKc@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc15SimpleConverter7ConvertB5cxx11EPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc15SimpleConverter7ConvertEPKcPc@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc15SimpleConverter7ConvertEPKc{size_t}Pc@Base 1.1.4+ds1 ++ _ZNK6opencc15SimpleConverter7ConvertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ _ZNK6opencc16SerializedValues12KeyMaxLengthEv@Base 1.1.4+ds1 ++ _ZNK6opencc16SerializedValues15ConstructBufferEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPSt6vectorItSaItEEPj@Base 1.1.4+ds1 ++ _ZNK6opencc16SerializedValues15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 ++ _ZNK6opencc19MultiValueDictEntry8ToStringB5cxx11Ev@Base 1.1.4+ds1 ++ _ZNK6opencc20MaxMatchSegmentation7SegmentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc4Dict11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc4Dict16MatchAllPrefixesEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc8TextDict10GetLexiconEv@Base 1.1.4+ds1 ++ _ZNK6opencc8TextDict12KeyMaxLengthEv@Base 1.1.4+ds1 ++ _ZNK6opencc8TextDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc8TextDict5MatchEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc9Converter7ConvertEPKcPc@Base 1.1.4+ds1 ++ _ZNK6opencc9Converter7ConvertERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE@Base 1.1.4+ds1 ++ _ZNK6opencc9DartsDict10GetLexiconEv@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc9DartsDict11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc9DartsDict12KeyMaxLengthEv@Base 1.1.4+ds1 ++ _ZNK6opencc9DartsDict15SerializeToFileEP8_IO_FILE@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc9DartsDict5MatchEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc9DictGroup10GetLexiconEv@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc9DictGroup11MatchPrefixEPKc{size_t}@Base 1.1.4+ds1 ++ _ZNK6opencc9DictGroup12KeyMaxLengthEv@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc9DictGroup16MatchAllPrefixesEPKc{size_t}@Base 1.1.4+ds1 ++ (subst)_ZNK6opencc9DictGroup5MatchEPKc{size_t}@Base 1.1.4+ds1 ++ (optional=templinst)_ZNSt17_Function_handlerIFbRKN6opencc13PhraseExtractERKNS0_19UTF8StringSliceBaseIhEEEPS8_E10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation@Base 1.1.4+ds1 ++ (optional=templinst)_ZNSt17_Function_handlerIFbRKN6opencc13PhraseExtractERKNS0_19UTF8StringSliceBaseIhEEEPS8_E9_M_invokeERKSt9_Any_dataS3_S7_@Base 1.1.4+ds1 ++ _ZTIFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 ++ _ZTIN6opencc10BinaryDictE@Base 1.1.4+ds1 ++ _ZTIN6opencc10MarisaDictE@Base 1.1.4+ds1 ++ _ZTIN6opencc11InvalidUTF8E@Base 1.1.4+ds1 ++ _ZTIN6opencc12FileNotFoundE@Base 1.1.4+ds1 ++ _ZTIN6opencc12SegmentationE@Base 1.1.4+ds1 ++ _ZTIN6opencc13InvalidFormatE@Base 1.1.4+ds1 ++ _ZTIN6opencc13PhraseExtractE@Base 1.1.4+ds1 ++ _ZTIN6opencc15FileNotWritableE@Base 1.1.4+ds1 ++ _ZTIN6opencc15ShouldNotBeHereE@Base 1.1.4+ds1 ++ _ZTIN6opencc16SerializableDictE@Base 1.1.4+ds1 ++ _ZTIN6opencc16SerializedValuesE@Base 1.1.4+ds1 ++ _ZTIN6opencc19MultiValueDictEntryE@Base 1.1.4+ds1 ++ _ZTIN6opencc20MaxMatchSegmentationE@Base 1.1.4+ds1 ++ _ZTIN6opencc20SingleValueDictEntryE@Base 1.1.4+ds1 ++ _ZTIN6opencc21InvalidTextDictionaryE@Base 1.1.4+ds1 ++ _ZTIN6opencc4DictE@Base 1.1.4+ds1 ++ _ZTIN6opencc6ConfigE@Base 1.1.4+ds1 ++ _ZTIN6opencc8TextDictE@Base 1.1.4+ds1 ++ _ZTIN6opencc9DartsDictE@Base 1.1.4+ds1 ++ _ZTIN6opencc9DictEntryE@Base 1.1.4+ds1 ++ _ZTIN6opencc9DictGroupE@Base 1.1.4+ds1 ++ _ZTIN6opencc9ExceptionE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTIN9__gnu_cxx7__mutexE@Base 1.1.4+ds1 ++ _ZTIPFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTISt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTISt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ _ZTSFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 ++ _ZTSN5Darts15DoubleArrayImplIchijNS_6LengthIcEEEE@Base 1.1.4+ds1 ++ _ZTSN6opencc10BinaryDictE@Base 1.1.4+ds1 ++ _ZTSN6opencc10MarisaDictE@Base 1.1.4+ds1 ++ _ZTSN6opencc11InvalidUTF8E@Base 1.1.4+ds1 ++ _ZTSN6opencc12FileNotFoundE@Base 1.1.4+ds1 ++ _ZTSN6opencc12SegmentationE@Base 1.1.4+ds1 ++ _ZTSN6opencc13InvalidFormatE@Base 1.1.4+ds1 ++ _ZTSN6opencc13PhraseExtractE@Base 1.1.4+ds1 ++ _ZTSN6opencc15FileNotWritableE@Base 1.1.4+ds1 ++ _ZTSN6opencc15ShouldNotBeHereE@Base 1.1.4+ds1 ++ _ZTSN6opencc16NoValueDictEntryE@Base 1.1.4+ds1 ++ _ZTSN6opencc16SerializableDictE@Base 1.1.4+ds1 ++ _ZTSN6opencc16SerializedValuesE@Base 1.1.4+ds1 ++ _ZTSN6opencc19MultiValueDictEntryE@Base 1.1.4+ds1 ++ _ZTSN6opencc20MaxMatchSegmentationE@Base 1.1.4+ds1 ++ _ZTSN6opencc20SingleValueDictEntryE@Base 1.1.4+ds1 ++ _ZTSN6opencc21InvalidTextDictionaryE@Base 1.1.4+ds1 ++ _ZTSN6opencc22StrMultiValueDictEntryE@Base 1.1.4+ds1 ++ _ZTSN6opencc23StrSingleValueDictEntryE@Base 1.1.4+ds1 ++ _ZTSN6opencc4DictE@Base 1.1.4+ds1 ++ _ZTSN6opencc6ConfigE@Base 1.1.4+ds1 ++ _ZTSN6opencc8TextDictE@Base 1.1.4+ds1 ++ _ZTSN6opencc9DartsDictE@Base 1.1.4+ds1 ++ _ZTSN6opencc9DictEntryE@Base 1.1.4+ds1 ++ _ZTSN6opencc9DictGroupE@Base 1.1.4+ds1 ++ _ZTSN6opencc9ExceptionE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSN9__gnu_cxx7__mutexE@Base 1.1.4+ds1 ++ _ZTSPFbRKN6opencc13PhraseExtractERKNS_19UTF8StringSliceBaseIhEEE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt11_Mutex_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10BinaryDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10BinaryDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10ConversionELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10ConversionELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10MarisaDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc10MarisaDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc15ConversionChainELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc15ConversionChainELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc16SerializedValuesELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc16SerializedValuesELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc20MaxMatchSegmentationELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc20MaxMatchSegmentationELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc7LexiconELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc7LexiconELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8SegmentsELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8SegmentsELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8TextDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc8TextDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9ConverterELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9ConverterELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DartsDictELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DartsDictELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DictGroupELN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt15_Sp_counted_ptrIPN6opencc9DictGroupELN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ (arch=armel riscv64)_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE1EE@Base 1.1.4+ds1 ++ (arch=!armel !riscv64)_ZTSSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE@Base 1.1.4+ds1 ++ _ZTVN6opencc10BinaryDictE@Base 1.1.4+ds1 ++ _ZTVN6opencc10MarisaDictE@Base 1.1.4+ds1 ++ _ZTVN6opencc13PhraseExtractE@Base 1.1.4+ds1 ++ _ZTVN6opencc16SerializedValuesE@Base 1.1.4+ds1 ++ _ZTVN6opencc19MultiValueDictEntryE@Base 1.1.4+ds1 ++ _ZTVN6opencc20MaxMatchSegmentationE@Base 1.1.4+ds1 ++ _ZTVN6opencc4DictE@Base 1.1.4+ds1 ++ _ZTVN6opencc6ConfigE@Base 1.1.4+ds1 ++ _ZTVN6opencc8TextDictE@Base 1.1.4+ds1 ++ _ZTVN6opencc9DartsDictE@Base 1.1.4+ds1 ++ _ZTVN6opencc9DictGroupE@Base 1.1.4+ds1 ++ (optional=templinst)_ZZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEixIS5_EERS6_RKNS0_IS2_T_EEE6buffer@Base 1.1.4+ds1 ++ (c++)"non-virtual thunk to opencc::DartsDict::SerializeToFile(_IO_FILE*) const@Base" 1.1.4+ds1 ++ (c++)"non-virtual thunk to opencc::MarisaDict::SerializeToFile(_IO_FILE*) const@Base" 1.1.4+ds1 ++ (c++)"non-virtual thunk to opencc::TextDict::SerializeToFile(_IO_FILE*) const@Base" 1.1.4+ds1 ++ opencc_close@Base 1.1.4+ds1 ++ opencc_convert_utf8@Base 1.1.4+ds1 ++ opencc_convert_utf8_free@Base 1.1.4+ds1 ++ opencc_convert_utf8_to_buffer@Base 1.1.4+ds1 ++ opencc_error@Base 1.1.4+ds1 ++ opencc_open@Base 1.1.4+ds1 diff --cc debian/opencc.install index 0000000,0000000..1df36c6 new file mode 100644 --- /dev/null +++ b/debian/opencc.install @@@ -1,0 -1,0 +1,1 @@@ ++usr/bin/* diff --cc debian/patches/0001-use-cmake-install-libdir.patch index 0000000,0000000..a91c95e new file mode 100644 --- /dev/null +++ b/debian/patches/0001-use-cmake-install-libdir.patch @@@ -1,0 -1,0 +1,32 @@@ ++From: IME Packaging Team ++Date: Mon, 9 Oct 2017 22:02:39 +0800 ++Subject: use-cmake-install-libdir ++ ++Update 2021-09-18: Also use GNUInstallDirs. ++ ++Last-Update: 2024-07-28 ++--- ++ CMakeLists.txt | 3 ++- ++ 1 file changed, 2 insertions(+), 1 deletion(-) ++ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index 3393613..6db5fa1 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -21,6 +21,7 @@ cmake_minimum_required(VERSION 3.5) ++ set (PACKAGE_NAME opencc) ++ project (${PACKAGE_NAME} CXX) ++ include (CTest) +++include (GNUInstallDirs) ++ ++ ######## Options ++ option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF) ++@@ -82,7 +83,7 @@ set (DIR_PREFIX ${CMAKE_INSTALL_PREFIX}) ++ set (DIR_INCLUDE ${DIR_PREFIX}/include) ++ set (DIR_SHARE ${DIR_PREFIX}/share) ++ set (DIR_ETC ${DIR_PREFIX}/etc) ++-set (DIR_LIBRARY ${DIR_PREFIX}/lib${LIB_SUFFIX}) +++set (DIR_LIBRARY ${CMAKE_INSTALL_LIBDIR}) ++ ++ if (DEFINED SHARE_INSTALL_PREFIX) ++ set (DIR_SHARE ${SHARE_INSTALL_PREFIX}) diff --cc debian/patches/0002-Force-build-with-c-17.patch index 0000000,0000000..b06452f new file mode 100644 --- /dev/null +++ b/debian/patches/0002-Force-build-with-c-17.patch @@@ -1,0 -1,0 +1,31 @@@ ++From: Boyuan Yang ++Date: Tue, 9 Sep 2025 08:25:14 -0400 ++Subject: Force build with c++17 ++ ++Needed by googletest. ++--- ++ CMakeLists.txt | 4 ++-- ++ 1 file changed, 2 insertions(+), 2 deletions(-) ++ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index ba28233..25abb7d 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -155,7 +155,7 @@ add_definitions( ++ ++ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") ++ add_definitions( ++- -std=c++14 +++ -std=c++17 ++ -Wall ++ ) ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") ++@@ -164,7 +164,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") ++ endif () ++ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") ++ add_definitions( ++- -std=c++14 +++ -std=c++17 ++ -Wall ++ ) ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") diff --cc debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch index 0000000,0000000..8a4c445 new file mode 100644 --- /dev/null +++ b/debian/patches/0003-no-remote-images-when-reading-docs-on-disk.patch @@@ -1,0 -1,0 +1,29 @@@ ++From: Gunnar Hjalmarsson ++Date: Sun, 28 Jul 2024 19:42:55 -0400 ++Subject: Don't fetch remote images when reading docs on disk ++ ++This fixes a privacy breach previously reported as Lintian warnings ++ ++Forwarded: not-needed ++Last-Update: 2024-07-28 ++--- ++ README.md | 7 ------- ++ 1 file changed, 7 deletions(-) ++ ++diff --git a/README.md b/README.md ++index e4edffb..cc22afd 100644 ++--- a/README.md +++++ b/README.md ++@@ -1,12 +1,5 @@ ++ # Open Chinese Convert 開放中文轉換 ++ ++-[![CMake](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/cmake.yml) ++-[![Bazel](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/bazel.yml) ++-[![MSVC](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/msvc.yml) ++-[![Node.js CI](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/nodejs.yml) ++-[![Python CI](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml/badge.svg)](https://github.com/BYVoid/OpenCC/actions/workflows/python.yml) ++-[![AppVeyor](https://img.shields.io/appveyor/ci/Carbo/OpenCC.svg)](https://ci.appveyor.com/project/Carbo/OpenCC) ++- ++ ## Introduction 介紹 ++ ++ ![OpenCC](https://opencc.byvoid.com/img/opencc.png) diff --cc debian/patches/0004-Use-system-googletest.patch index 0000000,0000000..2309815 new file mode 100644 --- /dev/null +++ b/debian/patches/0004-Use-system-googletest.patch @@@ -1,0 -1,0 +1,23 @@@ ++From: Shengjing Zhu ++Date: Sun, 28 Jul 2024 19:44:27 -0400 ++Subject: Use system googletest ++ ++Forwarded: not-needed ++Last-Update: 2024-07-28 ++--- ++ CMakeLists.txt | 2 ++ ++ 1 file changed, 2 insertions(+) ++ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index 6db5fa1..fcdedeb 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -231,6 +231,8 @@ add_subdirectory(test) ++ if (ENABLE_GTEST) ++ if(NOT USE_SYSTEM_GTEST) ++ add_subdirectory(deps/googletest-1.15.0) +++ else() +++ add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) ++ endif() ++ enable_testing() ++ endif() diff --cc debian/patches/0005-Disable-build-in-setup.py.patch index 0000000,0000000..e08a956 new file mode 100644 --- /dev/null +++ b/debian/patches/0005-Disable-build-in-setup.py.patch @@@ -1,0 -1,0 +1,20 @@@ ++From: Shengjing Zhu ++Date: Fri, 2 Aug 2024 17:11:08 +0800 ++Subject: Disable build in setup.py ++ ++--- ++ setup.py | 1 + ++ 1 file changed, 1 insertion(+) ++ ++diff --git a/setup.py b/setup.py ++index a4bc500..f32590e 100644 ++--- a/setup.py +++++ b/setup.py ++@@ -62,6 +62,7 @@ def get_long_description(): ++ ++ ++ def build_libopencc(output_path): +++ return ++ print('building libopencc into %s' % _build_dir) ++ ++ is_windows = sys.platform == 'win32' diff --cc debian/patches/0009-setup.py-Handle-python-binding-instead-of-cmake.patch index 0000000,0000000..8155990 new file mode 100644 --- /dev/null +++ b/debian/patches/0009-setup.py-Handle-python-binding-instead-of-cmake.patch @@@ -1,0 -1,0 +1,55 @@@ ++From: Boyuan Yang ++Date: Tue, 13 Jan 2026 18:04:57 -0500 ++Subject: setup.py: Handle python binding instead of cmake ++ ++--- ++ setup.py | 22 +++++++++++++++++----- ++ 1 file changed, 17 insertions(+), 5 deletions(-) ++ ++diff --git a/setup.py b/setup.py ++index f32590e..1d062e1 100644 ++--- a/setup.py +++++ b/setup.py ++@@ -8,6 +8,8 @@ import setuptools ++ import setuptools.command.build_ext ++ import wheel.bdist_wheel ++ +++import pybind11 +++ ++ _this_dir = os.path.dirname(os.path.abspath(__file__)) ++ _build_dir = os.path.join(_this_dir, 'build', 'python') ++ ++@@ -111,10 +113,13 @@ class OpenCCExtension(setuptools.Extension, object): ++ ++ class BuildExtCommand(setuptools.command.build_ext.build_ext, object): ++ def build_extension(self, ext): ++- if self.inplace: ++- output_path = os.path.join(_this_dir, 'python', 'opencc', 'clib') ++- else: ++- output_path = os.path.abspath(os.path.join(self.build_lib, 'opencc', 'clib')) +++ project_root = os.path.abspath(_this_dir) +++ build_dir = os.environ.get('OPENCC_BUILD_DIR', 'obj-x86_64-linux-gnu') +++ lib_path = os.path.join(project_root, build_dir, 'src') +++ ext.include_dirs.append(pybind11.get_include()) +++ ext.include_dirs.append('src') +++ ext.library_dirs = [lib_path] +++ ext.runtime_library_dirs = [lib_path] ++ if isinstance(ext, OpenCCExtension): ++ build_libopencc(output_path) ++ else: ++@@ -174,7 +179,14 @@ setuptools.setup( ++ ++ packages=packages, ++ package_dir={'opencc': 'python/opencc'}, ++- ext_modules=[OpenCCExtension('opencc.clib.opencc_clib', 'python')], +++ ext_modules=[ +++ setuptools.Extension( +++ 'opencc.clib.opencc_clib', +++ sources=['src/py_opencc.cpp'], +++ libraries=['opencc'], +++ language='c++' +++ ) +++ ], ++ cmdclass={ ++ 'build_ext': BuildExtCommand, ++ 'bdist_wheel': BDistWheelCommand diff --cc debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch index 0000000,0000000..e53d301 new file mode 100644 --- /dev/null +++ b/debian/patches/backport/0006-Fix-build-for-gcc-15-934.patch @@@ -1,0 -1,0 +1,23 @@@ ++From: Peng Wu ++Date: Thu, 13 Feb 2025 00:15:10 +0800 ++Subject: Fix build for gcc 15 (#934) ++ ++Co-authored-by: Peng Wu ++Bug-Debian: https://bugs.debian.org/1097512 ++--- ++ src/SerializedValues.hpp | 2 ++ ++ 1 file changed, 2 insertions(+) ++ ++diff --git a/src/SerializedValues.hpp b/src/SerializedValues.hpp ++index c17210b..f7e5bb2 100644 ++--- a/src/SerializedValues.hpp +++++ b/src/SerializedValues.hpp ++@@ -18,6 +18,8 @@ ++ ++ #pragma once ++ +++#include +++ ++ #include "Common.hpp" ++ #include "SerializableDict.hpp" ++ diff --cc debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch index 0000000,0000000..73f1f57 new file mode 100644 --- /dev/null +++ b/debian/patches/backport/0007-Fix-deprecated-declarations-in-C-17.patch @@@ -1,0 -1,0 +1,33 @@@ ++From: WhiredPlanck ++Date: Sat, 5 Jul 2025 03:57:30 +0800 ++Subject: Fix deprecated declarations in C++17 ++ ++--- ++ src/Segments.hpp | 6 +++++- ++ 1 file changed, 5 insertions(+), 1 deletion(-) ++ ++diff --git a/src/Segments.hpp b/src/Segments.hpp ++index 2186dfd..57320fe 100644 ++--- a/src/Segments.hpp +++++ b/src/Segments.hpp ++@@ -18,6 +18,7 @@ ++ ++ #pragma once ++ +++#include ++ #include ++ ++ #include "Common.hpp" ++@@ -53,8 +54,11 @@ public: ++ managed.push_back(str); ++ } ++ ++- class iterator : public std::iterator { +++ class iterator { ++ public: +++ using iterator_category = std::input_iterator_tag; +++ using value_type = const char*; +++ ++ iterator(const Segments* const _segments, size_t _cursor) ++ : segments(_segments), cursor(_cursor) {} ++ diff --cc debian/patches/backport/345c9a50ab07018f1b4439776bad78a0d40778ec.patch index 0000000,0000000..b12f716 new file mode 100644 --- /dev/null +++ b/debian/patches/backport/345c9a50ab07018f1b4439776bad78a0d40778ec.patch @@@ -1,0 -1,0 +1,212 @@@ ++From 345c9a50ab07018f1b4439776bad78a0d40778ec Mon Sep 17 00:00:00 2001 ++From: frankslin ++Date: Mon, 12 Jan 2026 16:51:38 -0800 ++Subject: [PATCH] Fix two out-of-bounds read issues when handling truncated ++ UTF-8 input (#1005) ++ ++Two independent out-of-bounds read issues were identified in OpenCC's UTF-8 ++processing logic when handling malformed or truncated UTF-8 sequences. ++ ++1) MaxMatchSegmentation: ++ NextCharLength() could return a value larger than the remaining input size. ++ The previous logic subtracted this value from a size_t length counter, ++ potentially causing underflow and subsequent out-of-bounds reads. ++ ++2) Conversion: ++ Similar length handling could allow reads past the end of the input buffer ++ during dictionary matching, potentially propagating unintended bytes to the ++ conversion output. ++ ++This patch fixes both issues by: ++- Explicitly tracking the end of the input buffer ++- Recomputing remaining length on each iteration ++- Clamping matched character and key lengths to the remaining buffer size ++- Preventing reads past the null terminator ++ ++The changes preserve existing behavior for valid UTF-8 input and add test ++coverage for truncated UTF-8 sequences. ++ ++These issues may have security implications when processing untrusted input ++and are classified as heap out-of-bounds reads (CWE-125). ++ ++Co-authored-by: Claude ++Applied-Upstream: https://github.com/BYVoid/OpenCC/commit/345c9a50ab07018f1b4439776bad78a0d40778ec ++--- ++ src/Conversion.cpp | 18 ++++++++++++- ++ src/ConversionTest.cpp | 40 +++++++++++++++++++++++++++ ++ src/MaxMatchSegmentation.cpp | 10 ++++--- ++ src/MaxMatchSegmentationTest.cpp | 46 ++++++++++++++++++++++++++++++++ ++ 4 files changed, 110 insertions(+), 4 deletions(-) ++ ++diff --git a/src/Conversion.cpp b/src/Conversion.cpp ++index 87a513514..d5737a1db 100644 ++--- a/src/Conversion.cpp +++++ b/src/Conversion.cpp ++@@ -23,14 +23,30 @@ using namespace opencc; ++ ++ std::string Conversion::Convert(const char* phrase) const { ++ std::ostringstream buffer; +++ // Calculate string end to prevent reading beyond null terminator +++ const char* phraseEnd = phrase; +++ while (*phraseEnd != '\0') { +++ phraseEnd++; +++ } +++ ++ for (const char* pstr = phrase; *pstr != '\0';) { ++- Optional matched = dict->MatchPrefix(pstr); +++ size_t remainingLength = phraseEnd - pstr; +++ Optional matched = dict->MatchPrefix(pstr, remainingLength); ++ size_t matchedLength; ++ if (matched.IsNull()) { ++ matchedLength = UTF8Util::NextCharLength(pstr); +++ // Ensure we don't read beyond the null terminator +++ if (matchedLength > remainingLength) { +++ matchedLength = remainingLength; +++ } ++ buffer << UTF8Util::FromSubstr(pstr, matchedLength); ++ } else { ++ matchedLength = matched.Get()->KeyLength(); +++ // Defensive: ensure dictionary key length does not exceed remaining input +++ // (MatchPrefix should already guarantee this, but defense in depth) +++ if (matchedLength > remainingLength) { +++ matchedLength = remainingLength; +++ } ++ buffer << matched.Get()->GetDefault(); ++ } ++ pstr += matchedLength; ++diff --git a/src/ConversionTest.cpp b/src/ConversionTest.cpp ++index 04a80a7b0..fb7731c7d 100644 ++--- a/src/ConversionTest.cpp +++++ b/src/ConversionTest.cpp ++@@ -47,4 +47,44 @@ TEST_F(ConversionTest, ConvertCString) { ++ EXPECT_EQ(expected, converted); ++ } ++ +++TEST_F(ConversionTest, TruncatedUtf8Sequence) { +++ // This test specifically triggers the information disclosure vulnerability +++ // in the old code. The bug occurs when a string ends with an incomplete +++ // UTF-8 sequence. +++ // +++ // Background: UTF8Util::NextCharLength() examines only the first byte to +++ // determine the expected character length (1-6 bytes), but doesn't verify +++ // that enough bytes actually remain before the null terminator. +++ // +++ // Trigger condition: When the expected UTF-8 character length exceeds +++ // the actual remaining bytes before null, the old code would: +++ // 1. Call FromSubstr with a length crossing the null terminator +++ // 2. Advance pstr beyond the null terminator +++ // 3. Continue reading heap memory on next iteration +++ // 4. Output leaked heap data to conversion result (INFORMATION DISCLOSURE) +++ +++ // Construct a string ending with a truncated 3-byte UTF-8 sequence: +++ // - Normal text: "干" (valid 3-byte UTF-8: 0xE5 0xB9 0xB2) +++ // - Followed by: 0xE5 0xB9 (incomplete 3-byte sequence - missing last byte) +++ std::string malformed; +++ malformed += utf8("干"); // Valid character +++ malformed += '\xE5'; // Start of 3-byte UTF-8 (NextCharLength returns 3) +++ malformed += '\xB9'; // Second byte +++ // Missing third byte - only 2 bytes remain but NextCharLength expects 3 +++ // Old code would jump over null, read heap memory, and leak it in output +++ +++ // The fixed code should handle this gracefully without information disclosure +++ EXPECT_NO_THROW({ +++ const std::string converted = conversion->Convert(malformed); +++ // Should convert "干" to "幹" (first candidate in dict) and preserve incomplete sequence +++ std::string expected; +++ expected += utf8("幹"); // Converted from "干" (dict has ["幹", "乾", "干"]) +++ expected += '\xE5'; // Incomplete sequence preserved as-is +++ expected += '\xB9'; +++ EXPECT_EQ(expected, converted); +++ // Should NOT contain garbage heap data beyond the input +++ // (ASan would catch any out-of-bounds reads during conversion) +++ }); +++} +++ ++ } // namespace opencc ++diff --git a/src/MaxMatchSegmentation.cpp b/src/MaxMatchSegmentation.cpp ++index 5cdd79f88..ff24e0a0e 100644 ++--- a/src/MaxMatchSegmentation.cpp +++++ b/src/MaxMatchSegmentation.cpp ++@@ -30,12 +30,17 @@ SegmentsPtr MaxMatchSegmentation::Segment(const std::string& text) const { ++ segLength = 0; ++ } ++ }; ++- size_t length = text.length(); +++ const char* textEnd = text.c_str() + text.length(); ++ for (const char* pstr = text.c_str(); *pstr != '\0';) { ++- const Optional& matched = dict->MatchPrefix(pstr, length); +++ size_t remainingLength = textEnd - pstr; +++ const Optional& matched = dict->MatchPrefix(pstr, remainingLength); ++ size_t matchedLength; ++ if (matched.IsNull()) { ++ matchedLength = UTF8Util::NextCharLength(pstr); +++ // Ensure we don't advance beyond the string boundary +++ if (matchedLength > remainingLength) { +++ matchedLength = remainingLength; +++ } ++ segLength += matchedLength; ++ } else { ++ clearBuffer(); ++@@ -44,7 +49,6 @@ SegmentsPtr MaxMatchSegmentation::Segment(const std::string& text) const { ++ segStart = pstr + matchedLength; ++ } ++ pstr += matchedLength; ++- length -= matchedLength; ++ } ++ clearBuffer(); ++ return segments; ++diff --git a/src/MaxMatchSegmentationTest.cpp b/src/MaxMatchSegmentationTest.cpp ++index 775c7efb4..c1c9e3521 100644 ++--- a/src/MaxMatchSegmentationTest.cpp +++++ b/src/MaxMatchSegmentationTest.cpp ++@@ -43,4 +43,50 @@ TEST_F(MaxMatchSegmentationTest, Segment) { ++ EXPECT_EQ(utf8("干燥"), std::string(segments->At(3))); ++ } ++ +++TEST_F(MaxMatchSegmentationTest, EmptyString) { +++ const auto& segments = segmenter->Segment(""); +++ EXPECT_EQ(0, segments->Length()); +++} +++ +++TEST_F(MaxMatchSegmentationTest, SingleCharacter) { +++ const auto& segments = segmenter->Segment(utf8("一")); +++ EXPECT_EQ(1, segments->Length()); +++ EXPECT_EQ(utf8("一"), std::string(segments->At(0))); +++} +++ +++TEST_F(MaxMatchSegmentationTest, TruncatedUtf8Sequence) { +++ // This test specifically triggers the buffer overflow bug in the old code. +++ // The bug occurs when a string ends with an incomplete UTF-8 sequence. +++ // +++ // Background: UTF8Util::NextCharLength() examines only the first byte to +++ // determine the expected character length (1-6 bytes), but doesn't verify +++ // that enough bytes actually remain in the buffer. +++ // +++ // Trigger condition: When the expected UTF-8 character length exceeds +++ // the actual remaining bytes, the old code's "length -= matchedLength" +++ // causes integer underflow (size_t wraps around to a huge value), leading +++ // to out-of-bounds reads in the next MatchPrefix() call. +++ +++ // Construct a string ending with a truncated 3-byte UTF-8 sequence: +++ // - Normal text: "一" (valid 3-byte UTF-8: 0xE4 0xB8 0x80) +++ // - Followed by: 0xE4 0xB8 (incomplete 3-byte sequence - missing last byte) +++ std::string malformed; +++ malformed += utf8("一"); // Valid character +++ malformed += '\xE4'; // Start of 3-byte UTF-8 (NextCharLength returns 3) +++ malformed += '\xB8'; // Second byte +++ // Missing third byte - only 2 bytes remain but NextCharLength expects 3 +++ // Old code: length=2, matchedLength=3 → length = 2-3 = SIZE_MAX (underflow) +++ +++ // The fixed code should handle this gracefully without buffer overflow +++ EXPECT_NO_THROW({ +++ const auto& segments = segmenter->Segment(malformed); +++ // The valid character "一" plus the incomplete sequence form a single segment +++ // (incomplete sequence doesn't match dictionary, gets accumulated with previous) +++ EXPECT_EQ(1, segments->Length()); +++ // Output should preserve all input bytes (including incomplete sequence) +++ // This is correct behavior - we don't discard data, we preserve it +++ EXPECT_EQ(malformed, std::string(segments->At(0))); +++ }); +++} +++ ++ } // namespace opencc diff --cc debian/patches/series index 0000000,0000000..3b76d84 new file mode 100644 --- /dev/null +++ b/debian/patches/series @@@ -1,0 -1,0 +1,9 @@@ ++0001-use-cmake-install-libdir.patch ++0002-Force-build-with-c-17.patch ++0003-no-remote-images-when-reading-docs-on-disk.patch ++0004-Use-system-googletest.patch ++0005-Disable-build-in-setup.py.patch ++backport/0006-Fix-build-for-gcc-15-934.patch ++backport/0007-Fix-deprecated-declarations-in-C-17.patch ++backport/345c9a50ab07018f1b4439776bad78a0d40778ec.patch ++0009-setup.py-Handle-python-binding-instead-of-cmake.patch diff --cc debian/pybuild.testfiles index 0000000,0000000..560dfad new file mode 100644 --- /dev/null +++ b/debian/pybuild.testfiles @@@ -1,0 -1,0 +1,1 @@@ ++python/tests/test_opencc.py python/tests/ diff --cc debian/python3-opencc.install index 0000000,0000000..4606faa new file mode 100644 --- /dev/null +++ b/debian/python3-opencc.install @@@ -1,0 -1,0 +1,1 @@@ ++usr/lib/python3* diff --cc debian/rules index 0000000,0000000..356981c new file mode 100755 --- /dev/null +++ b/debian/rules @@@ -1,0 -1,0 +1,76 @@@ ++#!/usr/bin/make -f ++# -*- makefile -*- ++# Uncomment this to turn on verbose mode. ++export DH_VERBOSE=1 ++ ++# see FEATURE AREAS in dpkg-buildflags(1) ++export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto ++ ++include /usr/share/dpkg/architecture.mk ++ ++# Used in the python3 binding (setup.py) ++export OPENCC_BUILD_DIR = obj-$(DEB_BUILD_GNU_TYPE) ++ ++ ++# Disable parallel build to circumvent some random build error ++# (needs further investigation) ++%: ++ dh $@ --buildsystem=cmake --no-parallel ++ ++ ++# Python build handled separately in pyproject.toml and setup.py ++BUILD_OPTIONS = \ ++ -DCMAKE_INSTALL_PREFIX=/usr \ ++ -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/ \ ++ -DCMAKE_BUILD_TYPE=Release \ ++ -DBUILD_PYTHON=OFF \ ++ -DUSE_SYSTEM_DARTS=ON \ ++ -DUSE_SYSTEM_GTEST=ON \ ++ -DUSE_SYSTEM_MARISA=ON \ ++ -DUSE_SYSTEM_PYBIND11=ON \ ++ -DUSE_SYSTEM_RAPIDJSON=ON \ ++ -DUSE_SYSTEM_TCLAP=ON ++ ++ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) ++BUILD_OPTIONS += -DBUILD_DOCUMENTATION=ON ++else ++BUILD_OPTIONS += -DBUILD_DOCUMENTATION=OFF ++endif ++ ++ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ++BUILD_OPTIONS += -DENABLE_GTEST=ON ++else ++BUILD_OPTIONS += -DENABLE_GTEST=OFF ++endif ++ ++override_dh_auto_configure: ++ dh_auto_configure -- $(BUILD_OPTIONS) ++ ++execute_after_dh_auto_build: ++ dh_auto_build -O--buildsystem=pybuild -- -s pyproject ++ ++execute_after_dh_auto_test: ++ dh_auto_test -O--buildsystem=pybuild -- -s pyproject ++ ++execute_after_dh_auto_install: ++ dh_auto_install -O--buildsystem=pybuild -- -s pyproject ++ chrpath --delete debian/tmp/usr/lib/*/dist-packages/opencc/clib/*.so ++ for i in debian/tmp/usr/lib/*/dist-packages/opencc/clib/; do \ ++ mkdir -p $$i/share/; \ ++ ln -sf ../../../../../../share/opencc $$i/share/; \ ++ done ++ ++execute_after_dh_auto_clean: ++ find . -name *.pyc -delete ++ ++execute_after_dh_installdocs-indep: ++ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) ++ dh_doxygen --indep ++endif ++ ++override_dh_installdocs: ++ dh_installdocs -plibopencc-doc --doc-main-package=opencc ++ dh_installdocs --remaining-packages ++ ++override_dh_installchangelogs: ++ dh_installchangelogs -k NEWS.md diff --cc debian/source/format index 0000000,0000000..163aaf8 new file mode 100644 --- /dev/null +++ b/debian/source/format @@@ -1,0 -1,0 +1,1 @@@ ++3.0 (quilt) diff --cc debian/source/lintian-overrides index 0000000,0000000..ceb0cce new file mode 100644 --- /dev/null +++ b/debian/source/lintian-overrides @@@ -1,0 -1,0 +1,2 @@@ ++# libopencc1.1 installs architecture dependent .ocd2 files ++dependency-is-not-multi-archified libopencc-dev depends on libopencc1.1 (multi-arch: no) diff --cc debian/tests/CMakeLists.txt index 0000000,0000000..e6f88c7 new file mode 100644 --- /dev/null +++ b/debian/tests/CMakeLists.txt @@@ -1,0 -1,0 +1,24 @@@ ++cmake_minimum_required(VERSION 3.18) ++project (opencc-integration CXX) ++include (CTest) ++enable_testing() ++ ++find_package(PkgConfig REQUIRED) ++find_program (OPENCC_TOOL opencc REQUIRED) ++pkg_check_modules(OPENCC REQUIRED IMPORTED_TARGET opencc) ++ ++add_definitions( ++ -DCMAKE_BINARY_DIR="${CMAKE_BINARY_DIR}" ++ -DCMAKE_SOURCE_DIR="${CMAKE_SOURCE_DIR}" ++ -DPROJECT_BINARY_PATH="${OPENCC_TOOL}" ++) ++make_directory(${CMAKE_BINARY_DIR}/test) ++add_subdirectory(/usr/src/googletest/googletest ${CMAKE_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL) ++set(UNITTESTS ++ CommandLineConvertTest ++) ++foreach(UNITTEST ${UNITTESTS}) ++ add_executable(${UNITTEST} ${UNITTEST}.cpp) ++ target_link_libraries(${UNITTEST} gtest gtest_main PkgConfig::OPENCC) ++ add_test(${UNITTEST} ${UNITTEST}) ++endforeach(UNITTEST) diff --cc debian/tests/CommandLineConvertTest.cpp index 0000000,0000000..6ca6068 new file mode 100644 --- /dev/null +++ b/debian/tests/CommandLineConvertTest.cpp @@@ -1,0 -1,0 +1,104 @@@ ++/* ++ * Open Chinese Convert ++ * ++ * Copyright 2015 Carbo Kuo ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#include ++ ++#include "Common.hpp" ++#include "gtest/gtest.h" ++ ++namespace opencc { ++ ++class CommandLineConvertTest : public ::testing::Test { ++protected: ++ CommandLineConvertTest() { GetCurrentWorkingDirectory(); } ++ ++ virtual ~CommandLineConvertTest() { free(originalWorkingDirectory); } ++ ++ virtual void SetUp() { ++ ASSERT_NE("", CMAKE_BINARY_DIR); ++ ASSERT_NE("", CMAKE_SOURCE_DIR); ++ ASSERT_EQ(0, chdir("/usr/share/opencc/")); ++ } ++ ++ virtual void TearDown() { ASSERT_EQ(0, chdir(originalWorkingDirectory)); } ++ ++ std::string GetFileContents(const std::string& fileName) const { ++ std::ifstream fs(fileName); ++ EXPECT_TRUE(fs.is_open()); ++ const std::string content((std::istreambuf_iterator(fs)), ++ (std::istreambuf_iterator())); ++ fs.close(); ++ return content; ++ } ++ ++ void GetCurrentWorkingDirectory() { ++ originalWorkingDirectory = getcwd(nullptr, 0); ++ } ++ ++ const char* OpenccCommand() const { ++ return PROJECT_BINARY_PATH; ++ } ++ ++ const char* InputDirectory() const { ++ return CMAKE_SOURCE_DIR "/../../test/testcases/"; ++ } ++ ++ const char* OutputDirectory() const { return CMAKE_BINARY_DIR "/test/"; } ++ ++ const char* AnswerDirectory() const { ++ return CMAKE_SOURCE_DIR "/../../test/testcases/"; ++ } ++ ++ const char* ConfigurationDirectory() const { ++ return "/usr/share/opencc/"; ++ } ++ ++ std::string OutputFile(const char* config) const { ++ return std::string(OutputDirectory()) + config + ".out"; ++ } ++ ++ std::string AnswerFile(const char* config) const { ++ return std::string(AnswerDirectory()) + config + ".ans"; ++ } ++ ++ std::string TestCommand(const char* config) const { ++ return OpenccCommand() + std::string("") + " -i " + InputDirectory() + ++ config + ".in" + " -o " + OutputFile(config) + " -c " + ++ ConfigurationDirectory() + config + ".json"; ++ } ++ ++ char* originalWorkingDirectory; ++}; ++ ++class ConfigurationTest : public CommandLineConvertTest, ++ public ::testing::WithParamInterface {}; ++ ++TEST_P(ConfigurationTest, Convert) { ++ const char* config = GetParam(); ++ ASSERT_EQ(0, system(TestCommand(config).c_str())); ++ const std::string& output = GetFileContents(OutputFile(config)); ++ const std::string& answer = GetFileContents(AnswerFile(config)); ++ ASSERT_EQ(answer, output); ++} ++ ++INSTANTIATE_TEST_CASE_P(CommandLine, ConfigurationTest, ++ ::testing::Values("hk2s", "hk2t", "jp2t", "s2hk", "s2t", ++ "s2tw", "s2twp", "t2hk", "t2jp", "t2s", ++ "tw2s", "tw2sp", "tw2t")); ++ ++} // namespace opencc diff --cc debian/tests/README.md index 0000000,0000000..12d6cec new file mode 100644 --- /dev/null +++ b/debian/tests/README.md @@@ -1,0 -1,0 +1,3 @@@ ++Fork from ../../test, please refresh this file if source has changed. ++ ++Test with installed opencc tool and library. diff --cc debian/tests/control index 0000000,0000000..5afd579 new file mode 100644 --- /dev/null +++ b/debian/tests/control @@@ -1,0 -1,0 +1,8 @@@ ++Tests: integration ++Depends: ++ build-essential, ++ cmake, ++ googletest, ++ pkgconf, ++ @, ++Restrictions: allow-stderr, diff --cc debian/tests/integration index 0000000,0000000..c1f1746 new file mode 100755 --- /dev/null +++ b/debian/tests/integration @@@ -1,0 -1,0 +1,12 @@@ ++#!/bin/sh ++ ++set -ex ++ ++cd "$(dirname "$0")" ++mkdir -p build ++cd build ++cmake .. ++make ++make test ++cd .. ++rm -rf build diff --cc debian/upstream/metadata index 0000000,0000000..85af1e4 new file mode 100644 --- /dev/null +++ b/debian/upstream/metadata @@@ -1,0 -1,0 +1,4 @@@ ++Bug-Database: https://github.com/BYVoid/OpenCC/issues ++Bug-Submit: https://github.com/BYVoid/OpenCC/issues/new ++Repository: https://github.com/BYVoid/OpenCC.git ++Repository-Browse: https://github.com/BYVoid/OpenCC diff --cc debian/watch index 0000000,0000000..7c65a04 new file mode 100644 --- /dev/null +++ b/debian/watch @@@ -1,0 -1,0 +1,4 @@@ ++version=4 ++opts="dversionmangle=s/\+ds\d?$//,repack,repacksuffix=+ds1,filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%@PACKAGE@-$1.tar.gz%" \ ++ https://github.com/byvoid/@PACKAGE@/tags \ ++ (?:.*?/)?(?:ver\.)?@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate